package demo.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import demo.user.pojo.Status;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author LonelySnow
 * @since 2020-06-15
 */
public interface StatusMapper extends BaseMapper<Status> {

    @Select("SELECT s.* FROM user_status us, `status` s WHERE us.status_id = s.id AND us.user_id = #{uid}")
    Status getOneByUserId(@Param("uid") Long uid);
}
